<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>优惠券</title>
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link type="text/css" rel="stylesheet" media="screen" href="__FONT__/css/style.css"/>
    <link type="text/css" rel="stylesheet" media="screen" href="__FONT__/css/media.css"/>
    <script type="text/javascript" src="__FONT__/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript">
	  $(function(){
			tab(".ul_new li",".tab_box",1)
			tab(".dsd li",".tab_box2",1)
			tab(".dsds li",".tab_box2s",1)
		})
		function tab(a,b,c){
			if(c==1){
				   $(a).click(function(){  
					   var index = $(this).index();
					   $(this).addClass("on").siblings().removeClass("on");
					   $(b).hide();      
					   $(b+":eq("+index+")").show();
					   
					})}      
				else{
					 $(a).hover(function(){  
					   var index = $(this).index();
					   $(this).addClass("on").siblings().removeClass("on");
					   $(b).hide();      
					   $(b+":eq("+index+")").show();
					})
				}        
			}
	</script>
</head>
<body style="background:#fff;">
	<include file="Public/customHeader" title="优惠券" url="{:U('/User/index')}"/>
 	<section class="mrs_detailsec discount">
         <div class="tab">
            <ul class="ul_new">
              <li class="on"><a href="javascript:;">可使用</a></li>
              <li><a href="javascript:;">已失效</a></li>
              <div class="huiline"></div>
            </ul>
            <div class="tab_box bd">
            	<if condition="$coupons">
            	<foreach name="coupons" item="coupon">
               <div class="oneli">
                  <div class="oneli_main clear">
                     <h1>{$coupon.coupon_title}</h1>
                     <strong><span><neq name="coupon.c_type" value="2">{$coupon.money_reduce}</neq>
                     <eq name="coupon.c_type" value="2">{$coupon.money_amount}</eq>
                     </span>元</strong>
                     <label><neq name="coupon.c_type" value="2">满{$coupon.money_max}元使用</neq></label>
                  </div>
                  <div class="btmli">
                 	<if condition="$coupon['expiry_type'] eq 1">
                     <h2>无限制</h2>
                     <else />
                      <h2>使用期限 <span>{$coupon.expires_time|date="Y-m-d H:i:s",###}</span></h2>
                     </if>
                  </div>
               </div>
               </foreach>
               <else/>
	              <div class="no_bank"><h1>美滴滴</h1><p>没有可用优惠券~</p></div>
               </if>
            </div>
            
            <div class="tab_box box_two" style="display:none" >
            	<if condition="$notCoupons">
               <foreach name="notCoupons" item="expiresCoupon">
               <div class="oneli twoli ">
                  <div class="oneli_main clear">
                     <h1>{$expiresCoupon.coupon_title}</h1>
                     <strong><span><neq name="expiresCoupon.c_type" value="2">{$expiresCoupon.money_reduce}</neq>
                     <eq name="expiresCoupon.c_type" value="2">{$expiresCoupon.money_amount}</eq>
                     </span>元</strong>
                     <label><neq name="expiresCoupon.c_type" value="2">满{$expiresCoupon.money_max}元使用</neq></label>
                  </div>
                  <div class="btmli">
                 	<if condition="$expiresCoupon['expiry_type'] eq 1">
                     <h2>无限制</h2>
                     <else />
                      <h2>使用期限 <span>{$expiresCoupon.expires_time|date="Y-m-d H:i:s",###}</span></h2>
                     </if>
                  </div>
                  <if condition="$expiresCoupon ['status'] eq 2">
                  <img src="__FONT__/images/discount_03.png" class="yinzhang">
                  <else />
                 	<img src="__FONT__/images/discount_03_outtime.png" class="yinzhang">
                  </if>
               </div>
               </foreach>
               <else/>
	              <div class="no_bank"><h1>美滴滴</h1><p>没有优惠券失效记录~</p></div>
               </if>
            </div>
         </div>
	</section>
</body>
</html>